package com.lucky.common.mapper;

import com.lucky.common.pojo.po.OrgPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
public interface OrgMapper extends com.baomidou.mybatisplus.core.mapper.BaseMapper<OrgPO> {

	
	@Select("SELECT o.* FROM m_user_org o inner join m_user u on o.id= u.org_id WHERE u.USER_STATUS = '1' and u.id=#{userId}")
	OrgPO getOrgByUserId(@Param("userId") Long userId);

}